<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>内联样式</title>
    <script src="scripts/jquery-3.4.1.min.js"></script>
    <script src="scripts/vue.js"></script>
</head>
<body>
    <!--css内联样式变量拼接-->
    <div id="app">
        <div style="width:100px;height:100px;background-color: skyblue;" :style="{border:borderWidth+'px solid red',padding:paddingWidth+'px' }">        </div>
        <hr>
        <!--css内联样式放置对象-->
        <div :style="styleObj"></div>
        <!--css内联样式数组的方式拼接-->
        <hr>
        <div :style="styleArr"></div>
    </div>



    <script>
        let app=new Vue({
            el:"#app",
            data:{
                borderWidth:20,
                paddingWidth:20,
                styleObj:{
                    width:"100px",
                    height:"100px",
                    'background-color':'skyblue'
                },
                styleArr:[
                {
                    width:"100px",
                    height:"100px",
                    'background-color':'skyblue'
                },
                {
                    border:'30px solid yellow'
                }
                ]
            },
            
        })
    </script>
    
</body>
</html>